package com.ybf.user.dal.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 是否隐藏
 *
 * @author 向南
 * @date 15:20 2023/6/6
 **/
@AllArgsConstructor
@Getter
public enum IsHiddenEnum {

    NO(0, "否"),
    YES(1, "是")

    ;
    private Integer code;

    private String desc;

    public static IsHiddenEnum isHiddenEnum(Integer code){
        return Arrays.stream(IsHiddenEnum.values()).filter(f -> f.code.equals(code)).findFirst().orElse(null);
    }

}
